<template>
  <div class="s">
    <h4>我是子组件</h4>
    <div>我是头部</div>
    <div>
      <slot :list="list">
        <ul>
          <li v-for="(item, index) in list" :key="index">
            {{ item.name }}
          </li>
        </ul>
      </slot>
    </div>
    <div>我是底部</div>
  </div>
</template>

<script>
export default {
  data () {
    return {
      list: [
        { id: 1, name: '追命' },
        { id: 2, name: '铁手' },
        { id: 3, name: '无情' },
        { id: 4, name: 'xjj' }
      ]
    }
  }
}
</script>

<style></style>
